<template>
	<view :class="[BackGround]" :style="[{'font-weight':Style,'font-family':Font,height:100 + '%',minHeight:height + 'px'}]">
		<cu-custom bgColor="bg-gradual-blue" isBack="true">
			<view slot="backText">返回</view>
			<view slot="content">生产报表</view>
		</cu-custom>
		<list-box ref="list" :list="list" @jumpview="jumpArchives" @zylongtap="zylongtap"></list-box>
		<chunLei-popups v-model="value1" :popData="data1" @tapPopup="tapPopup" @zyinput="zyinput" :x="x" :y="y" placement="top-end"></chunLei-popups>
	</view>
</template>

<script>
	import chunLeiPopups from "@/colorui/components/chunLei-popups/chunLei-popups"
	import ListBox from '@/colorui/components/list.vue'
	import {
		mapGetters
	} from 'vuex'
	import {
		Commonly,
	} from "@/mixin/mixin.js"
	export default {
		mixins:[Commonly],
		data() {
			return {
				height:this.screenHeight,
				list: [
					{
					img: "/static/images/Machineplatform.png",
					url:"./Reportform/Machineplatform/Machineplatform",
					name: '基础报表',
					LMENUID: '970601',
					isShow: true,
					id: 0
				}, {
					img: "/static/images/Operationreport.png",
					url:"./Reportform/Operationreport/Operationreport",
					name: '运转报表',
					LMENUID: '970602',
					isShow: true,
					id: 1
				}, {
					img: "/static/images/Productivityanalysis.png",
					url:"./Reportform/Productivityanalysis/Productivityanalysis",
					name: '产能分析',
					LMENUID: '970603',
					isShow: true,
					id: 2
				}, {
					img: "/static/images/Efficiencystatement.png",
					url:"./Reportform/Efficiencystatement/Efficiencystatement",
					name: '效能报表',
					LMENUID: '980301',
					isShow: true,
					id: 3
				}, {
					img: "/static/images/Yieldcorrection.png",
					url:"./Reportform/Yieldcorrection/Yieldcorrection",
					name: '产量修正',
					LMENUID: '980301',
					isShow: true,
					id: 4
				}, {
					img: "/static/images/Productionsupplement.png",
					url:"./Reportform/Productionsupplement/Productionsupplement",
					name: '补录',
					LMENUID: '980301',
					isShow: true,
					id: 5
				},
				{
					img: "/static/images/yield.png",
					url:"./Reportform/yield/yield",
					name: '员工产量报表',
					LMENUID: '702301',
					isShow: global.yield,
					id: 6
				},],
			};
		},
		computed: {
			...mapGetters([
				'Style', 'Font','BackGround','BackGroundBox'
			])
		},
		components: {
			ListBox,
			chunLeiPopups
		},
		onLoad() {
			let tree = uni.getStorageSync('tree')
			for (let value of tree) {
				if (value.LFUNCNAME == '柠徽智能') {
					for (let ww of value.children) {
						if (ww.LFUNCNAME == '报表管理') {
							for (let tt of ww.children) {
								for (let uu of this.list) {
									if (uu.LMENUID == tt.LMENUID) {
										uu.isShow = true
									}
								}
							}
						}
					}
				}
			}
		},
		methods: {
			jumpArchives(item) {
				switch (item) {
					case 0:
						uni.navigateTo({
							url: './Machineplatform/Machineplatform',
						});
						break;
					case 1:
						uni.navigateTo({
							url: './Operationreport/Operationreport',
						});
						break;
					case 2:
						uni.navigateTo({
							url: './Productivityanalysis/Productivityanalysis',
						});
						break;
					case 3:
						uni.navigateTo({
							url: './Efficiencystatement/Efficiencystatement',
						});
						break;
					case 4:
						uni.navigateTo({
							url: './Yieldcorrection/Yieldcorrection',
						});
						break;
					case 5:
						uni.navigateTo({
							url: './Productionsupplement/Productionsupplement',
						});
						break;
					case 6:
						uni.navigateTo({
							url: './yield/yield',
						});
						break;
					default:
						break;
				}
			},
		}
	};
</script>

<style>

</style>
